//Cuadro 6.05 Reserva de Primas

function res_riesgo_temp()
	{
	var n1=(document.getElementById('ntemp_ant_rr').value -0);
	var n2=(document.getElementById('find_actualiz').value -0);
	var n3== n1 * n2;
	var n4=n3.toFixed(0);
	document.getElementById('ntemp_act_rr').value = n4;
	}
	
function total_ant_rr()
	{
	var n1=(document.getElementById('ndotal_ant_rr').value -0);
	var n2=(document.getElementById('npl_ant_rr').value -0);
	var n3=(document.getElementById('ntemp_ant_rr').value -0);
	var n4=(document.getElementById('nsalud_ant_rr').value -0);
	var n5=(document.getElementById('ndesg_ant_rr').value -0);
	document.getElementById('ntotal_ant_rr').value = n1 + n2 + n3 + n4 + n5;
	}
	

//Cuadro 6.02 Apertura de Primas

function total1()
	{
	var n1=(document.getElementById('ndotal1').value -0);
	var n2=(document.getElementById('nvidae1').value -0);
	var n3=(document.getElementById('ntemp1').value -0);
	var n4=(document.getElementById('nsalud1').value -0);
	var n5=(document.getElementById('ndesg1').value -0);
	document.getElementById('ntotal1').value = n1 + n2 + n3 + n4 + n5;
	}

function total2()
	{
	var n1=(document.getElementById('ndotal2').value -0);
	var n2=(document.getElementById('nvidae2').value -0);
	var n3=(document.getElementById('ntemp2').value -0);
	var n4=(document.getElementById('nsalud2').value -0);
	var n5=(document.getElementById('ndesg2').value -0);
	document.getElementById('ntotal2').value = n1 + n2 + n3 + n4 + n5;
	}
	
function porc1()
	{
	var n1=(document.getElementById('ndotal1').value -0);
	var n2=(document.getElementById('ntotal1').value -0);
	var n3=(n1 / n2) * 100;
	var n4=n3.toFixed(2); 
	document.getElementById('fporc1').value = n4;
	}	

function porc2()
	{
	var n1=(document.getElementById('nvidae1').value -0);
	var n2=(document.getElementById('ntotal1').value -0);
	var n3=(n1 / n2) * 100;
	var n4=n3.toFixed(2); 
	document.getElementById('fporc2').value = n4;
	}
	
function porc3()
	{
	var n1=(document.getElementById('ntemp1').value -0);
	var n2=(document.getElementById('ntotal1').value -0);
	var n3=(n1 / n2) * 100;
	var n4=n3.toFixed(2); 
	document.getElementById('fporc3').value = n4;
	}
	
function porc4()
	{
	var n1=(document.getElementById('nsalud1').value -0);
	var n2=(document.getElementById('ntotal1').value -0);
	var n3=(n1 / n2) * 100;
	var n4=n3.toFixed(2); 
	document.getElementById('fporc4').value = n4;
	}
	
function porc5()
	{
	var n1=(document.getElementById('ndesg1').value -0);
	var n2=(document.getElementById('ntotal1').value -0);
	var n3=(n1 / n2) * 100;
	var n4=n3.toFixed(2); 	
	document.getElementById('fporc5').value = n4;
	}
	
function total3()
	{
	var n1=(document.getElementById('ndotal3').value -0);
	var n2=(document.getElementById('nplan3').value -0);
	document.getElementById('ntotal3').value = n1 + n2;
	}
	
function total4()
	{
	var n1=(document.getElementById('ndotal4').value -0);
	var n2=(document.getElementById('nplan4').value -0);
	document.getElementById('ntotal4').value = n1 + n2;
	}
	
function total5()
	{
	var n1=(document.getElementById('ndotal5').value -0);
	var n2=(document.getElementById('nplan5').value -0);
	document.getElementById('ntotal5').value = n1 + n2;
	}
	
function total6()
	{
	var n1=(document.getElementById('ndotal6').value -0);
	var n2=(document.getElementById('nplan6').value -0);
	document.getElementById('ntotal6').value = n1 + n2;
	}
	
function total7()
	{
	var n1=(document.getElementById('ndotal7').value -0);
	var n2=(document.getElementById('nplan7').value -0);
	document.getElementById('ntotal7').value = n1 + n2;
	}
	
function total8()
	{
	var n1=(document.getElementById('ndotal8').value -0);
	var n2=(document.getElementById('nplan8').value -0);
	document.getElementById('ntotal8').value = n1 + n2;
	}
	
function total3_act()
	{
	var n1=(document.getElementById('ndotal3_act').value -0);
	var n2=(document.getElementById('nplan3_act').value -0);
	document.getElementById('ntotal3_act').value = n1 + n2;
	}
	
function total4_act()
	{
	var n1=(document.getElementById('ndotal4_act').value -0);
	var n2=(document.getElementById('nplan4_act').value -0);
	document.getElementById('ntotal4_act').value = n1 + n2;
	}
	
function total5_act()
	{
	var n1=(document.getElementById('ndotal5_act').value -0);
	var n2=(document.getElementById('nplan5_act').value -0);
	document.getElementById('ntotal5_act').value = n1 + n2;
	}
	
function total6_act()
	{
	var n1=(document.getElementById('ndotal6_act').value -0);
	var n2=(document.getElementById('nplan6_act').value -0);
	document.getElementById('ntotal6_act').value = n1 + n2;
	}
	
function total7_act()
	{
	var n1=(document.getElementById('ndotal7_act').value -0);
	var n2=(document.getElementById('nplan7_act').value -0);
	document.getElementById('ntotal7_act').value = n1 + n2;
	}
	
function total8_act()
	{
	var n1=(document.getElementById('ndotal8_act').value -0);
	var n2=(document.getElementById('nplan8_act').value -0);
	document.getElementById('ntotal8_act').value = n1 + n2;
	}
										
function tot_ej1()
	{
	var n1=(document.getElementById('ndotal3').value -0);
	var n2=(document.getElementById('ndotal4').value -0);
	var n3=(document.getElementById('ndotal5').value -0);
	var n4=(document.getElementById('ndotal6').value -0);
	var n5=(document.getElementById('ndotal7').value -0);
	var n6=(document.getElementById('ndotal8').value -0);
	document.getElementById('ntot_ej1').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
	
	function tot_ej2()
	{
	var n1=(document.getElementById('ndotal3_act').value -0);
	var n2=(document.getElementById('ndotal4_act').value -0);
	var n3=(document.getElementById('ndotal5_act').value -0);
	var n4=(document.getElementById('ndotal6_act').value -0);
	var n5=(document.getElementById('ndotal7_act').value -0);
	var n6=(document.getElementById('ndotal8_act').value -0);
	document.getElementById('ntot_ej2').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
	
	function tot_ej3()
	{
	var n1=(document.getElementById('nplan3').value -0);
	var n2=(document.getElementById('nplan4').value -0);
	var n3=(document.getElementById('nplan5').value -0);
	var n4=(document.getElementById('nplan6').value -0);
	var n5=(document.getElementById('nplan7').value -0);
	var n6=(document.getElementById('nplan8').value -0);
	document.getElementById('ntot_ej3').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
	
	function tot_ej4()
	{
	var n1=(document.getElementById('nplan3_act').value -0);
	var n2=(document.getElementById('nplan4_act').value -0);
	var n3=(document.getElementById('nplan5_act').value -0);
	var n4=(document.getElementById('nplan6_act').value -0);
	var n5=(document.getElementById('nplan7_act').value -0);
	var n6=(document.getElementById('nplan8_act').value -0);
	document.getElementById('ntot_ej4').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
	
	function tot_ej5()
	{
	var n1=(document.getElementById('ntotal3').value -0);
	var n2=(document.getElementById('ntotal4').value -0);
	var n3=(document.getElementById('ntotal5').value -0);
	var n4=(document.getElementById('ntotal6').value -0);
	var n5=(document.getElementById('ntotal7').value -0);
	var n6=(document.getElementById('ntotal8').value -0);
	document.getElementById('ntot_ej5').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
	
	function tot_ej6()
	{
	var n1=(document.getElementById('ntotal3_act').value -0);
	var n2=(document.getElementById('ntotal4_act').value -0);
	var n3=(document.getElementById('ntotal5_act').value -0);
	var n4=(document.getElementById('ntotal6_act').value -0);
	var n5=(document.getElementById('ntotal7_act').value -0);
	var n6=(document.getElementById('ntotal8_act').value -0);
	document.getElementById('ntot_ej6').value = n1 + n2 + n3 + n4 + n5 + n6;
	}
